﻿using System.Collections.Generic;
using System.Linq;

namespace Xc.DataAccess.Protocoals.WaterMeters.Models.Requests
{
    /// <summary>
    /// 写开阀
    /// </summary>
    public class SetOpenValveRequest : MeterFrameTxBase
    {
        internal protected override DataSegment DataSegment => DataSegment.OpenValve;

       internal protected override FrameCommand Cmd => FrameCommand.CMD2A;

        protected override void GetDataArea(List<byte> vs)
        {
            vs.Add((byte)OpenValvePolicy);
            vs.AddRange(Enumerable.Repeat<byte>(0, 2));

        }
        /// <summary>
        /// 自动关阀策略
        /// </summary>
        public OpenValvePolicy OpenValvePolicy { get; set; }
    }
}
